<template>
  <ConfigProvider :locale="zhCN">
    <RouterView />
  </ConfigProvider>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import { ConfigProvider } from 'ant-design-vue'
import { RouterView } from 'vue-router'
import { updateTheme } from '@/utils/theme_util'
import storageUtil from '@/utils/storage_util'

const initTheme = () => {
  let theme = storageUtil.get('data-theme') || 'default'
  updateTheme(theme)
}
onMounted(() => {
  initTheme()
})
</script>
<style lang="scss">
body {
  width: 100%;
  height: 100%;
  padding: 0px;
  margin: 0px;
}
#app {
  width: 100%;
  height: 100%;
}
</style>
